<template>
	<view class="page">
		<view class="head">
			<view class="head1">
				<text class="iconfont icon-fenxiang1"  @click="goBack"></text>
				<text class="nav-title">商家入驻</text>
				
			</view>
		</view>
			<view class="main">
				<view class="top">
					<view class="banner">
							
					<image src="http://sq85owu9k.hb-bkt.clouddn.com/lingpin/static/img/banner_01.png" mode="aspectFill"></image>
								
					</view>
					<view class="title">
						申请入驻
					</view>	
				</view>
					<view class="content">
							
							<view class="border">
								<u--form
												labelPosition="left"
												:model="model1"
												
												ref="uForm"
										>
											
											<u-form-item
													label="所属经营中心"
													prop="userInfo.name"
													
													@click="show = true;"
													
													ref="item1"
													labelWidth="100"
											>
											<u--input
												    v-model="model1.userInfo.name"
												    readonly
												></u--input>
												
												<u-icon
														slot="right"
														name="arrow-right"
												></u-icon>
											</u-form-item>
											<u-form-item
													label="所属行业"
													prop="userInfo.industry"
													
													@click="show1 = true;"
													
													ref="item1"
													labelWidth="100"
											>
											<u--input
												    v-model="model1.userInfo.industry"
												    readonly
												></u--input>
												
												<u-icon
														slot="right"
														name="arrow-right"
												></u-icon>
											</u-form-item>
										</u--form>
									
						<u-picker :show="show" :columns="actions" @confirm="confirm" @cancel="cancel"></u-picker>
						<u-picker :show="show1" :columns="actions1" @confirm="confirm1" @cancel="cancel1"></u-picker>				
							</view>
					</view>
					
					<view class="footer" >
						
						<view class="cancel" @click="cancel1">
							取消
						</view>
						
						<view class="next" @click="next1">
							下一步
						</view>
					</view>
				
			</view>
		</view>
</template>

<script>


	export default{
		data(){
			return{
				show: false,
				show1:false,
							model1: {
								userInfo: {
									name: '',
									industry:''
								},
							},
							
							
							
							
							
							actions: [['阿鲁科尔沁旗','敖汉旗','巴林右旗','巴林左旗','红山区','喀喇沁旗','克什克腾旗','林西县' ,'宁城县', '松山区','翁牛特旗', '元宝山区']],
							actions1: [['服装行业', '饮食行业','娱乐行业','其他行业']],
							rules:{
							}
				
			}
		},
		methods: {
			 
			goBack(){
					uni.navigateBack(-1)
			},
				
			cancel1(){
				console.log(111)
				 uni.reLaunch({
				        url: '/pages/home/home'
				    });
			},
			
			next1(){
				if(this.model1.userInfo.name && this.model1.userInfo.industry){
					uni.navigateTo({
						url:'/moduleA/setted/entryNotice/index'
					})
				}else{
					 uni.showToast({
					            title: '未选择地区和行业分类',
					            icon: 'none', // 设置为无图标
					            duration: 2000 // 提示的持续时间（可选）
					        });
				}
				
			},
			cancel(){
				this.show=false
				
			},
			cancel1(){
				
				this.show1=false
			},
			confirm(e){
				console.log(e)
				this.model1.userInfo.name=e.value
				
				this.show=false
				
			},
			confirm1(e){
				console.log(e)
			
				this.model1.userInfo.industry=e.value
				
				this.show1=false
			}
			}
	}
</script>


<style scoped lang="scss">
	@import 'setted.scss';
	
</style>
